﻿using System;
using UnityEngine;

namespace UFrameWork
{
    public class UnityLog
    {
        private string log = string.Empty;

        public void Write(object obj, ULogLevel level, string tag)
        {
            log = string.Format("[{0}]{1}-{2}:{3}", DateTime.Now.ToString("HH:mm:ss:fff"), level, tag, obj.ToString());
            switch (level)
            { 
                case ULogLevel.Waring:
                    Debug.LogWarning(log);
                    break;

                case ULogLevel.Error:
                    Debug.LogError(log);
                    break;

                default:
                    Debug.Log(log);
                    break;
            }
        }
    }
}
